package com.situ.mall.web.controller;

import com.situ.mall.common.service.ICategoryService;
import com.situ.mall.common.vo.IndexCategoryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

//商品菜单分类
@Controller
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private ICategoryService categoryService;
    @GetMapping("/list")
    @ResponseBody
    public List<IndexCategoryVO> list(){
        return categoryService.indexList();
    }
}
